
<?php
    //var_dump($userid);
    //var_dump($ip);
    //var_dump($time);
    include APPLICATION_PATH . '/application/views/head.phtml';
   include APPLICATION_PATH . '/application/views/top.phtml';
    include APPLICATION_PATH . '/application/views/left.phtml';
?>
<script src="/public/pagejs/logs_login.js"></script>

<div id="thispage" data-id="64"></div>
		<!-- BEGIN PAGE -->

		<div class="page-content">
			<!-- BEGIN SAMPLE PORTLET CONFIGURATION MODAL FORM-->
			<div id="portlet-config" class="modal hide">

				<div class="modal-header">

					<button data-dismiss="modal" class="close" type="button"></button>

					<h3>portlet Settings</h3>

				</div>

				<div class="modal-body">

					<p>Here will be a configuration form</p>

				</div>

			</div>

			<!-- END SAMPLE PORTLET CONFIGURATION MODAL FORM-->

			<!-- BEGIN PAGE CONTAINER-->        

			<div class="container-fluid">

				<!-- BEGIN PAGE HEADER-->

				<div class="row-fluid">

					<div class="span12">

						<!-- BEGIN STYLE CUSTOMIZER -->

						<div class="color-panel hidden-phone">

							<!-- <div class="color-mode-icons icon-color"></div> -->

							<div class="color-mode-icons icon-color-close"></div>

							<div class="color-mode">

								<p>THEME COLOR</p>

								<ul class="inline">

									<li class="color-black current color-default" data-style="default"></li>

									<li class="color-blue" data-style="blue"></li>

									<li class="color-brown" data-style="brown"></li>

									<li class="color-purple" data-style="purple"></li>

									<li class="color-grey" data-style="grey"></li>

									<li class="color-white color-light" data-style="light"></li>

								</ul>

								<label>

									<span>Layout</span>

									<select class="layout-option m-wrap small">

										<option value="fluid" selected>Fluid</option>

										<option value="boxed">Boxed</option>

									</select>

								</label>

								<label>

									<span>Header</span>

									<select class="header-option m-wrap small">

										<option value="fixed" selected>Fixed</option>

										<option value="default">Default</option>

									</select>

								</label>

								<label>

									<span>Sidebar</span>

									<select class="sidebar-option m-wrap small">

										<option value="fixed">Fixed</option>

										<option value="default" selected>Default</option>

									</select>

								</label>

								<label>

									<span>Footer</span>

									<select class="footer-option m-wrap small">

										<option value="fixed">Fixed</option>

										<option value="default" selected>Default</option>

									</select>

								</label>

							</div>

						</div>

						<!-- END BEGIN STYLE CUSTOMIZER -->  

						<!-- BEGIN PAGE TITLE & BREADCRUMB-->

						<h3 class="page-title">

							日志管理

						</h3>

						<ul class="breadcrumb">

							<li>

								<i class="icon-home"></i>
								<span>当前位置：</span>
								<span>首页</span>

								<i class="icon-angle-right"></i>

							</li>

							<li>

								<span>日志管理</span>

								<i class="icon-angle-right"></i>

							</li>

							<li><span>登录日志</span></li>

						</ul>

						<!-- END PAGE TITLE & BREADCRUMB-->

					</div>

				</div>

				<!-- END PAGE HEADER-->

				<!-- BEGIN PAGE CONTENT-->

				<div class="row-fluid">

					<div class="span6 responsive" data-tablet="span12 fix-offset" data-desktop="span6" style="width:100%;">

						<!-- BEGIN EXAMPLE TABLE PORTLET-->

						<div class="portlet box grey">

							<div class="portlet-title">

								<div class="caption"><i class="icon-user"></i>登录日志</div>

								<div class="actions controls">

<!--									<a href="#modal_add" data-toggle="modal" data-target="#modal_add" class="btn blue"><i class="icon-pencil"></i> 添加</a>-->
									<!--<a href="/Index/Authority/add" class="btn blue"><i class="icon-pencil"></i> 添加</a>-->

								</div>

							</div>

							<div class="portlet-body">

								<table class="table table-striped table-bordered table-hover" id="current_table">

									<thead>

										<tr>
											
											<th>用户名</th>
											<th>登录ip地址</th>
											<th>时间</th>
<!--											<th>操作</th>-->
										</tr>

									</thead>

									<tbody id="tbody">
<?php
    foreach ($loginlogs_info as $k => $v) {
        $style = (0 == ($k % 2)) ? 'odd' : 'even';
        echo <<< EOF
										<tr class="{$style} gradeX">

											<td>{$v['username']}</td>
											<td>{$v['ip']}</td>
											<td>{$v['current_time']}</td>
									

										</tr>
EOF;
    }
?>
									</tbody>
                </table>
                                <div id="pages">
<?php
    if($list[0]['rows']/$list[0]['every_page']<=1)
        {
            
        }
        else
        {
            print_r($allpage);
        }
?>
</div>

							</div>

						</div>
                        
                        		<div id="modal_add" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel3" aria-hidden="true">

									<div class="modal-header">

										<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>

										<h3 id="myModalLabel3">添加登录日志</h3>

									</div>

									<div class="modal-body">

										<form action="#" id="form_user_add" method="post" class="form-horizontal">

											<div class="control-group">

												<label class="control-label">用户名</label>

												<div class="controls">

													<select id="username">
                                                     <?php
													 foreach($user_info as $val)
													 {
														 echo '<option value="';
														 echo $val['user_id'] ;
														 echo '">';
														 echo $val['username'];
														 echo "</option>";
													 }
													 ?>
													</select>

												</div>

											</div>
											<div class="control-group">

												<label class="control-label">登录IP地址</label>

												<div class="controls">

													<input type="text" class="colorpicker-default m-wrap" name="ip" value="">

												</div>

											</div>

											 <div class="control-group">

												<label class="control-label">创建时间</label>

												<div class="controls">

													
													<input placeholder="请输入日期" class="laydate-icon" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"  name="date">

												</div>

											</div>

										</form>

									</div>

									<div class="modal-footer">

										<button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>

										<button class="btn green btn-primary" id="submit_form" data-dismiss="modal" >提交</button>
                                        
									</div>

								</div>

								<div id="modal_edit" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel3" aria-hidden="true">

									<div class="modal-header">

										<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>

										<h3 id="myModalLabel3">编辑登录日志</h3>

									</div>

									<div class="modal-body">

										<form action="#" id="form_user_edit" method="post" class="form-horizontal">

											<div class="control-group">

												<label class="control-label">用户名</label>

												<div class="controls">

													<select id="username">
														<?php
														foreach($user_info as $val)
														{
															echo '<option value="';
															echo $val['user_id'] ;
															echo '">';
															echo $val['username'];
															echo "</option>";
														}
														?>
													</select>
												</div>

											</div>

											<div class="control-group">

												<label class="control-label">登录IP地址</label>

												<div class="controls">

													<input type="text" class="colorpicker-default m-wrap" name="ip" value="">

												</div>

											</div>

											 <div class="control-group">

												<label class="control-label">创建时间</label>

												<div class="controls">

													
													<input placeholder="请输入日期" class="laydate-icon" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"  name="date">

												</div>

											</div>

										</form>

									</div>

									<div class="modal-footer">

										<button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>

										<button class="btn green btn-primary" id="submitEdit" data-dismiss="modal" >提交</button>
                                        
									</div>

								</div>

						<!-- END EXAMPLE TABLE PORTLET-->

					</div>

				</div>

				<!-- END PAGE CONTENT-->

			</div>

			<!-- END PAGE CONTAINER-->

		</div>

    <!-- END PAGE -->
<?php
    include APPLICATION_PATH . '/application/views/foot.phtml';
?>
